<?php

/**
 * Holds Mvc_Context_Controller class
 *
 * @author Mark
 *
 * @package Library
 * @subpackage Mvc
 */

/**
 * Controller context
 *
 * @author Mark
 */
class Mvc_Context_Controller {

	/**
	 * Config resource
	 * @var Config $_config
	 */
	protected $_config;

	/**
	 * Database resource
	 * @var Database $_db
	 */
	protected $_db;

	/**
	 * Language resource
	 * @var Language $_language
	 */
	protected $_language;

	/**
	 * Log resource
	 * @var Log $_log
	 */
	protected $_log;

	/**
	 * Request resource
	 * @var Mvc_Request $_request
	 */
	protected $_request;

	/**
	 * Router resource
	 * @var Mvc_Router $router
	 */
	protected $_router;

	/**
	 * Constructor
	 *
	 * @return void
	 */
	public function __construct() {
		//
	}


	/**
	 * Returns config resource
	 *
	 * @return Config
	 */
	public function getConfig() {
		return $this->_config;
	}

	/**
	 * Returns database resource
	 *
	 * @return Database
	 */
	public function getDb() {
		return $this->_db;
	}

	/**
	 * Returns language resource
	 *
	 * @return Language
	 */
	public function getLanguage() {
		return $this->_language;
	}

	/**
	 * Returns log resource
	 *
	 * @return Log
	 */
	public function getLog() {
		return $this->_log;
	}

	/**
	 * Returns request resource
	 *
	 * @return Mvc_Request
	 */
	public function getRequest() {
		return $this->_request;
	}

	/**
	 * Returns router resource
	 *
	 * @return Mvc_Router
	 */
	public function getRouter() {
		return $this->_router;
	}

	/**
	 * Sets config resource
	 *
	 * @param Config $config
	 * @return Mvc_Context_Base (fluent interface)
	 */
	public function setConfig(Config $config) {
		$this->_config = $config;
		return $this;
	}

	/**
	 * Sets database resource
	 *
	 * @param Database $db
	 * @return Mvc_Context_Base (fluent interface)
	 */
	public function setDb(Database $db) {
		$this->_db = $db;
		return $this;
	}

	/**
	 * Sets language resource
	 *
	 * @param Language $language
	 * @return Mvc_Context_Base (fluent interface)
	 */
	public function setLanguage(Language $language) {
		$this->_language = $language;
		return $this;
	}

	/**
	 * Sets log resource
	 *
	 * @param Log $log
	 * @return Mvc_Context_Controller (fluent interface)
	 */
	public function setLog(Log $log) {
		$this->_log = $log;
		return $this;
	}

	/**
	 * Sets request resource
	 *
	 * @param Mvc_Request $request
	 * @return Mvc_Context_Controller (fluent interface)
	 */
	public function setRequest(Mvc_Request $request) {
		$this->_request = $request;
		return $this;
	}

	/**
	 * Sets router resource
	 *
	 * @param Mvc_Router $router
	 * @return Mvc_Context_Base (fluent interface)
	 */
	public function setRouter(Mvc_Router $router) {
		$this->_router = $router;
		return $this;
	}

}
